Bug Fixes: issues discovered during MC/DC coverage step 4#10973
Open
danielinux wants to merge 3 commits into
Open
Bug Fixes: issues discovered during MC/DC coverage step 4#10973danielinux wants to merge 3 commits into
danielinux wants to merge 3 commits into
Conversation
Return early when inSz == 0, mirroring the other Ascon Update functions.
Initialize the mp_int temporaries as soon as they are allocated in wc_CompareDiffPQ(), _CheckProbablePrime() and wc_CheckProbablePrime_ex(), so the cleanup path handles them consistently in all cases.
Return 0 when all used digits are zero instead of scanning past them.
|
Contributor
|
Retest this please. (not clear what failed). |
philljj
self-requested a review
July 22, 2026 19:43
Contributor
|
Retest this please. windows test: |
SparkiDev
requested changes
Jul 24, 2026
| * allocated-but-uninitialized mp_int reads a garbage ->used and corrupts | ||
| * the heap. */ | ||
| if (c != NULL) | ||
| XMEMSET(c, 0, sizeof(*c)); |
Contributor
There was a problem hiding this comment.
Don't like the XMEMSET.
The mp_init_multi should be doing that if necessary.
Don't want to be doing multiple mp_init calls either.
Is the XMEMSET really needed?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
3x wolfcrypt bugfixes.
Testing
#10967
Checklist